import os

from functools import lru_cache

ROOT_PATH = os.path.dirname(__file__)

class Config():
    # 系统目录设置
    PATH: str    = ROOT_PATH
    WEB_PATH: str = os.path.dirname(ROOT_PATH) + "/frontend"
    # 系统参数
    DEBUG: bool  = True
    DOC_URL: str = "/docs"
    TITLE: str   = "高校课堂签到系统"
    DESCP: str   = "Web程序设计课程案例——高校课堂签到系统"
    VERSION: str = "1.0.1"
    HOST: str    = '0.0.0.0'
    PORT: int    = 8888
    RELOAD: bool = True
    # 数据库参数
    DB_HOST: str = "127.0.0.1"
    DB_PORT: int = 3306
    DB_USER: str = "root"
    DB_PWD : str = "123123"
    DB_NAME: str = "web2025"

@lru_cache()
def get_config():
    return Config()

if __name__ == '__main__':
    print(ROOT_PATH)